package hao.d0316;

import java.util.Scanner;
public class Exception {
    public void div() {
        try{
            Scanner sc = new Scanner(System.in);
            String s1 = sc.nextLine();
            String s2 = sc.nextLine();
            double i=Double.parseDouble(s1);
            double j=Double.parseDouble(s2);
            if(j==0){
                throw new ArithmeticException("除数不为0");
            }
            double result=i/j;
            System.out.println(result);
        } catch(NumberFormatException nfe){
            System.out.println("数字格式异常");
        }
    }

    public static void main(String[] args) {
        Exception exception = new Exception();
        exception.div();
    }
}
